package pub.guoxin.server.simulation.service.impl;

import org.springframework.stereotype.Service;
import pub.guoxin.server.simulation.service.CommunicationGenerator;
import pub.guoxin.server.simulation.service.Sender;
import pub.guoxin.server.simulation.service.SimulationService;

import javax.annotation.Resource;

/**
 * Create by guoxin on 2018/5/12
 */
@Service
public class SimulationServiceImpl implements SimulationService {

    @Resource(name = "messageQueueSender")
    private Sender sender;
    @Resource(name = "alarmCommunicationGenerator")
    private CommunicationGenerator communicationGenerator;

    @Override
    public void simulation() {
        String communication = communicationGenerator.generator();
        sender.send(communication);
    }
}
